package com.bigknow.appstore.common.constants;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class DateFormatConstants {

    public static final SimpleDateFormat F_1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    public static final SimpleDateFormat F_2 = new SimpleDateFormat("yyyy年MM月dd日 HH时mm分ss秒");
    public static final SimpleDateFormat F_3 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
    public static final SimpleDateFormat F_4 = new SimpleDateFormat("yyyy-MM-dd");
    public static final SimpleDateFormat F_5 = new SimpleDateFormat("yyyy/MM/dd");
    public static final SimpleDateFormat F_6 = new SimpleDateFormat("yyyy年MM月dd日");
    public static final SimpleDateFormat F_7 = new SimpleDateFormat("yyyy-MM-dd HH");
    public static final SimpleDateFormat F_8 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
    public static final SimpleDateFormat F_9 = new SimpleDateFormat("yyyy/MM/dd HH:mm");
    public static final SimpleDateFormat F_10 = new SimpleDateFormat("yyyy年MM月dd HH时mm分");
    public static final SimpleDateFormat F_11 = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
    public static final SimpleDateFormat F_12 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
    public static final SimpleDateFormat F_13 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS");
    public static final SimpleDateFormat F_14 = new SimpleDateFormat("yyyy/MM/dd'T'HH:mm:ss");
    public static final SimpleDateFormat F_15 = new SimpleDateFormat("yyyy/MM/dd'T'HH:mm:ss.SSS");
    public static final SimpleDateFormat F_16 = new SimpleDateFormat("dd MM yyyy");

    private static List<SimpleDateFormat> dfList = null;

    static {
        dfList = new ArrayList<SimpleDateFormat>();
        dfList.add(F_1);
        dfList.add(F_2);
        dfList.add(F_3);
        dfList.add(F_4);
        dfList.add(F_5);
        dfList.add(F_6);
        dfList.add(F_7);
        dfList.add(F_8);
        dfList.add(F_9);
        dfList.add(F_10);
        dfList.add(F_11);
        dfList.add(F_12);
        dfList.add(F_13);
        dfList.add(F_14);
        dfList.add(F_15);
        dfList.add(F_16);
    }

    public static List<SimpleDateFormat> getAllDateFormats() {
        return dfList;
    }

    public static String getCurrentTime(SimpleDateFormat format) {
        return format.format(new Date());
    }
}
